home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / fuzz.arc / FUZZ.DOC next >
Text File  |  1991-04-28  |  1KB  |  36 lines

  1. Documentation for FUZZ.TPU.
  2.  
  3. FUZZ is a unit that can be incorporated into any Turbo Pascal 4.0 or 5.0
  4. program.  This is done by including the Fuzz unit with the other USES units:
  5.  
  6. USES  Dos, Crt, Fuzz;
  7.  
  8. This unit provides only one function, called Similar, which is declared as
  9. the function
  10.  
  11. Function Similar(S1,S2 : String):Integer;
  12.  
  13. Similar uses the Ratcliff/Obershelp gestalt pattern matching algorithm to
  14. compare two strings and return their percentage similarity.
  15.  
  16. Instead of requiring an EXACT match by using the line:
  17.  
  18.     IF (String1 = String2) THEN
  19.       BEGIN
  20.         {Do-whatever}
  21.       END;
  22.       
  23. you can use the line:
  24.  
  25.    IF (Similar(String1,String2) > 65) THEN      
  26.      BEGIN
  27.        {Do-whatever}
  28.      END;
  29.      
  30.      
  31. This means, if the two strings are 65% similar (or more), the Do-whatever
  32. procedure will be executed.
  33.  
  34. FUZZ incorporates the assembly language comparison function contained in the
  35. file SIMIL.ASM which is included in this archive.
  36.